---
feature_name: Video Conferencing / Media Session
chrome_version: 91
feature_id: 5744304695803904
check_min_version: true
index: index.html
---

<h3>Background</h3>
<p>The <a href="https://web.dev/media-session">Media Session API</a> lets you
handle video conferencing actions such as mute/unmute, turnon/turnoff camera,
and hang up from a Picture-in-Picture window.</p>

<style>
  video { background: #263238; height: 198px; width: 100%;} 
  button { margin: 4px 0; }
</style>

<video playsinline autoplay muted></video>
<button id="openCameraButton">Open Camera</button>
<button id="togglePipButton">Toggle Picture-in-Picture</button>
<input id="autoPipCheckbox" type="checkbox">Automatically enter Picture-in-Picture</button>

{% include output_helper.html %}

<script>
  if (!('mediaSession' in navigator)) {
    ChromeSamples.setStatus('The Media Session API is not yet available.');
  }

  // This prevents unnecessary errors when Media Session API is not available.
  navigator.mediaSession = navigator.mediaSession || {};
  navigator.mediaSession.setActionHandler = navigator.mediaSession.setActionHandler || function() {};
  window.MediaMetadata = window.MediaMetadata || function() {};

  log = ChromeSamples.log;
</script>

{% include js_snippet.html filename='video-conferencing.js' %}
